package com.wkbb.common.enums;

public enum PayStatusEnum {
    /**
     * 1.待支付
     */
    STAYPAY(1,"待支付"),
    /**
     * 2处理中
     */
    INHANDPAY(2,"处理中"),

    /**
     * 3成功
     */
    SUCCESSPAY(3,"成功"),

    /**
     * 4失败
     */
    FALLPAY(4,"失败"),

    /**
     * 5未知异常
     */
    ERRORPAY(5,"未知异常"),

    /**
     * 6退款
     */
    REFUND(6,"退款");




    private PayStatusEnum(Integer value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private Integer value;

    private String desc;

    public Integer getValue() {
        return this.value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getDesc() {
        return this.desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDesc(Integer value) {
        for (PayStatusEnum PayStatus : PayStatusEnum.values()) {
            if (PayStatus.getValue().intValue()==value) {
                return PayStatus.getDesc();
            }
        }
        return null;
    }
}
